package ch.christianschweizer.demos.primefaces.view;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.context.FacesContext;

@ManagedBean
@SessionScoped
public class UserProfileBean {

	private static final String DEFAULT_THEME = "aristo";
	private String theme;

	public String getTheme() {
		theme = FacesContext.getCurrentInstance().getExternalContext()
				.getRequestParameterMap().get("theme");
		if (theme == null) {
			theme = DEFAULT_THEME;
		}
		return theme;
	}

	public void setTheme(String theme) {
		this.theme = theme;
	}

}
